Note: This tutorial assumes that you have completed the previous tutorials: Writing the Action Client. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Running the Action Client
Description: Shows how to run opencupboard_actionTutorial Level: BEGINNER
Setting the Parameters
There are several parameters detailing the specifics of the cabinet that you are trying to open which should be set. You can either do this by creating a YAML file or setting the parameters individually in the command line.
Creating a YAML
Navigate to the tutorial package you created in Writing the Action Client
roscd opencupboard_tutorial
Within that package, create the yaml/cabinet.yaml file and paste the following inside it:
door_width: # {float} which_arm: # {"right_arm","left_arm"} handle_pos: # {"left","top","right","bot"} adjust_head: # {[float,float,float]}
- door_width: measures the width of the door from the hinges to the handle, in meters.
- which_arm: indicates which arm you want to use to open the door
- handle_pos: indicates where on the door the handle is
- adjust_head: gives an x,y,z coordinate for the head to look at so it can see the door, given that its in a position where its arm is able to open the door
Optional additional parameters include
max_x: # {float} min_x: # {float} max_y: # {float} min_y: # {float} max_z: # {float} min_z: # {float} handle_orientation: # {"horizontal","vertical"} handle_z: # {float}
- max_x, min_x, max_y, min_y, max_z, min_z: indicates an area where the handle is located, should not be too strict
- handle_orientation: indicates whether the handle is vertical or horizontal relative to the floor
- handle_z: indicates the approximate height of the handle relative to the floor
Using Command Line
Four params must be set: door_width, which_arm, handle_pos, adjust_head. You can set those on the command line
rosparam set parameter_name value
See rosparam wiki for more details on rosparams